﻿using System;
using System.Collections.Generic;
using System.Text;
using ServerGps.cn.b2m.eucp.sdkhttp;

namespace ServerGps
{
    class EMayService
    {
        private static cn.b2m.eucp.sdkhttp.SDKService emay = new ServerGps.cn.b2m.eucp.sdkhttp.SDKService();
        private static EMayService singleton = new EMayService();
        private String serialNumber = "3SDK-VBT-0130-LHUPK";
        private string password = "249302";
        private string session_key = "123456";

        private EMayService() {
            //int result = emay.registEx(serialNumber, session_key, password);
            //++result;
        }
        public static EMayService getInstance() {
            return singleton;
        }
        public int send(string phone_num, string content) {
            AccessService.sendSms(phone_num, content);
            return 1;
            //int result = emay.registEx(serialNumber, session_key, password);
            //return emay.sendSMS(serialNumber, session_key, null, new string[] { phone_num }, content, null, "GBK", 1);
        }
        public mo[] recv()
        {
            mo[] messages = emay.getMO(serialNumber, session_key);
            return messages;
        }
        public static void Main1() {
            //int result = getInstance().send("13466391630", "测试emay");
            mo[] msg = getInstance().recv();
            Console.In.ReadLine();
            Console.In.ReadLine();
            Console.In.ReadLine();
        }
    }
}
